import { View, Text } from "@tarojs/components";
import "./index.less";
type Options = string[];
interface StepItemProps {
  options: Options;
}
const Steps = (props: StepItemProps) => {
  return (
    <View className="steps">
      {props.options.map((item, index) => {
        return (
          <View className="step-item">
            <View className="step-item__tag">
              <View className="text">{index + 1}</View>
              {index !== props.options.length - 1 && (
                <View className="line"></View>
              )}
            </View>
            <View className="step-item_content">
              <Text className="text">{item}</Text>
            </View>
          </View>
        );
      })}
    </View>
  );
};

export default Steps;
